%% -*- mode: erlang -*-

%% 项目依赖配置
{deps,
    [
        %% EMQX核心组件依赖
        {emqx, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.4.1"}, "apps/emqx"}}
        , {emqx_ctl, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.4.1"}, "apps/emqx_ctl"}}
        , {emqx_utils, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.4.1"}, "apps/emqx_utils"}}
        , {emqx_durable_storage, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.4.1"}, "apps/emqx_durable_storage"}}
        , {emqx_resource, {git_subdir, "https://github.com/emqx/emqx.git", {tag, "v5.4.1"}, "apps/emqx_resource"}}
        , {jsone, {git, "https://github.com/emqx/jsone.git", {tag, "1.7.1"}}}
        , {thoas, {git, "https://github.com/emqx/thoas.git", {tag, "v1.0.0"}}}
        , {credentials_obfuscation, {git, "https://github.com/emqx/credentials-obfuscation.git", {tag, "v3.2.0"}}}
        , {ecpool, {git, "https://github.com/emqx/ecpool", {tag, "0.5.7"}}}
        %% RabbitMQ客户端依赖
        , {rabbit_common, "3.11.28"}
        , {amqp_client, "3.11.28"}
    ]}.

%% 插件配置
{plugins, [
    {emqx_plugrel, {git, "https://github.com/emqx/emqx_plugrel.git", {tag, "0.3.0"}}}
]}.

%% 编译选项配置
{erl_opts, [debug_info]}.

%% 发布配置
{relx, [ {release, {emqx_plugin_rabbitmq, "v5.4.1"}, %% this is the release version, different from app vsn in .app file
            [ emqx_plugin_rabbitmq, jsone, ecpool, amqp_client, rabbit_common, thoas, credentials_obfuscation]
        }
       , {dev_mode, false}
       , {include_erts, false}
       ]}.

%% EMQX插件发布相关配置
{emqx_plugrel,
    [{authors, ["WXW"]}
        , {builder,
        [{name, ""}
            , {contact, ""}
            , {website, ""}
        ]}
        , {repo, "https://github.com/igit-cn/emqx_plugin_rabbitmq.git"}
        , {functionality, ["emqx_plugin_rabbitmq"]}
        , {compatibility,
        [{emqx, ">= v5.4.1 && <= v5.6.1"}
        ]}
        , {description, "RabbitMQ Plugin For EMQX."}
    ]
}.

%% 交叉引用检查配置
{xref_checks, [undefined_function_calls, undefined_functions, locals_not_used,
    deprecated_function_calls, warnings_as_errors, deprecated_functions]}.
